/* 企业级应用基础样式 */
:root {
  /* 主题色彩 */
  --primary-color: #1890ff;
  --success-color: #52c41a;
  --warning-color: #faad14;
  --error-color: #f5222d;
  --info-color: #1890ff;
  
  /* 中性色 */
  --text-color: rgba(0, 0, 0, 0.85);
  --text-color-secondary: rgba(0, 0, 0, 0.45);
  --border-color: #d9d9d9;
  --bg-color: #f0f2f5;
  --bg-color-light: #ffffff;
  
  /* 阴影 */
  --box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.09);
  --box-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.1);
  
  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';
  
  /* 圆角 */
  --border-radius-base: 6px;
  --border-radius-lg: 8px;
  
  /* 间距 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
}

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-family);
  line-height: 1.5;
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 基础元素样式 */
body, html {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 16px;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 18px;
}

h4, h5, h6 {
  font-size: 16px;
}

p {
  margin-bottom: 16px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #40a9ff;
}

ul, ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  padding: 0;
}

input, textarea, select {
  font-family: var(--font-family);
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  background-color: #f6f8fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

pre {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  background-color: #f6f8fa;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 16px;
}

/* 工具类 */
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 响应式设计断点 */
@media (max-width: 480px) {
  :root {
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
  }
  
  html {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-lg: 20px;
    --spacing-xl: 28px;
  }
}

@media (max-width: 1024px) {
  :root {
    --spacing-xl: 30px;
  }
}

/* 打印样式 */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
}
